﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="AddTags.aspx.vb" Inherits="WSADProject.AddTags" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
        <div style="text-align:center"><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Admin/AddTags.aspx">Add Tags</asp:HyperLink>&nbsp;&nbsp;&nbsp;
    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Admin/ManageUser.aspx">Manage Users</asp:HyperLink> &nbsp;&nbsp;&nbsp;
    </div></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
                  <asp:Button ID="btninsert" runat="server" Text="New Tag" CausesValidation="False" />
        <asp:Button ID="Button4" runat="server" Text="Button" style="display:none"/>
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="Button4" PopupControlID="pnlpopup"
CancelControlID="btnCancel" BackgroundCssClass="modalBackground">
</ajaxToolkit:ModalPopupExtender>
<asp:Panel ID="pnlpopup" runat="server" BackColor="White" style="display:block">
    <asp:Label ID="Label2" runat="server" Text="Enter Tags"></asp:Label> <br />
     <asp:Label ID="Label1" runat="server" Text="Tag"></asp:Label>  <asp:TextBox ID="txtMessage" runat="server" Height="16px" Width="407px" ></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Tags is required." ControlToValidate="txtMessage" ForeColor="#CC0000"></asp:RequiredFieldValidator>
    <br />
<asp:Button ID="btnAdd" CommandName="Update" runat="server" Text="Save"/>
<asp:Button ID="btnCancel" runat="server" Text="Cancel" />
</asp:Panel>  
    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" GroupItemCount="5">
        <AlternatingItemTemplate>
            <td runat="server" style="">
                <asp:Label ID="TagDescriptionLabel" runat="server" Text='<%# Eval("TagDescription") %>' />
                </td>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <td runat="server" style="">TagDescription:
                <asp:TextBox ID="TagDescriptionTextBox" runat="server" Text='<%# Bind("TagDescription") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                <br /></td>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="">
                <tr>
                    <td>No Tags entered.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <EmptyItemTemplate>
<td runat="server" />
        </EmptyItemTemplate>
        <GroupTemplate>
            <tr id="itemPlaceholderContainer" runat="server">
                <td id="itemPlaceholder" runat="server"></td>
            </tr>
        </GroupTemplate>
        <InsertItemTemplate>
            <td runat="server" style="">TagDescription:
                <asp:TextBox ID="TagDescriptionTextBox" runat="server" Text='<%# Bind("TagDescription") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                <br /></td>
        </InsertItemTemplate>
        <ItemTemplate>
            <td runat="server" style="">
                <asp:Label ID="TagDescriptionLabel" runat="server" Text='<%# Eval("TagDescription") %>' />
                </td>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table id="groupPlaceholderContainer" runat="server" border="0" style="">
                            <tr id="groupPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="">
                        <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                <asp:NumericPagerField />
                                <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <td runat="server" style="">TagDescription:
                <asp:Label ID="TagDescriptionLabel" runat="server" Text='<%# Eval("TagDescription") %>' />
                <br /></td>
        </SelectedItemTemplate>
    </asp:ListView>
                  <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:fishconn %>" ProviderName="<%$ ConnectionStrings:fishconn.ProviderName %>" SelectCommand="SELECT [TagDescription] FROM [tblTags]"></asp:SqlDataSource>
</asp:Content>
